<script src="/static/admin/js/skins.min.js"></script>
<!--Basic Scripts-->
<script src="/static/admin/js/jquery.min.js"></script>
<script src="/static/admin/js/bootstrap.min.js"></script>
<script src="/static/admin/js/slimscroll/jquery.slimscroll.min.js"></script>
<!--Beyond Scripts-->
<script src="/static/admin/js/beyond.js"></script>
<script src="/static/admin/js/toastr/toastr.js"></script>
<script src="/static/admin/js/BeAlert.js"></script>
<script>
    $(window).bind("load", function () {

        /*Sets Themed Colors Based on Themes*/
        themeprimary = getThemeColorFromCss('themeprimary');
        themesecondary = getThemeColorFromCss('themesecondary');
        themethirdcolor = getThemeColorFromCss('themethirdcolor');
        themefourthcolor = getThemeColorFromCss('themefourthcolor');
        themefifthcolor = getThemeColorFromCss('themefifthcolor');

    });

    $(function () {
        $('#loginout').click(function () {
            url = '/admin/Logout/index';
            $.ajax({
                data: $('form').serialize(),
                type: "POST",
                url: url,
                dataType: 'json',
                success: (data) => {
                    if (data.code === 1) {
                        toastr.success(data.msg);
                        setTimeout(function () {
                            location.href = '/admin/Login/index';
                        }, 2000);
                    } else {
                        toastr.error(data.msg);
                    }
                }
            });
            return false;
        });
    });
</script>